load("@prelude//android:min_sdk_version.bzl", "get_min_sdk_version_constraint_value_name", "get_min_sdk_version_range")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native  # Avoid warnings and auto-formatters

prelude.constraint_setting(
    name = "maybe_build_only_native_code",
    visibility = ["PUBLIC"],
)

prelude.constraint_value(
    name = "build_only_native_code",
    constraint_setting = ":maybe_build_only_native_code",
    visibility = ["PUBLIC"],
)

prelude.constraint_setting(
    name = "maybe_merge_native_libraries",
    visibility = ["PUBLIC"],
)

prelude.constraint_value(
    name = "merge_native_libraries",
    constraint_setting = ":maybe_merge_native_libraries",
    visibility = ["PUBLIC"],
)

prelude.filegroup(
    name = "files",
    srcs = glob(
        ["**"],
    ),
    visibility = ["PUBLIC"],
)

prelude.constraint_setting(
    name = "min_sdk_version",
    visibility = ["PUBLIC"],
)

[
    prelude.constraint_value(
        name = get_min_sdk_version_constraint_value_name(min_sdk),
        constraint_setting = ":min_sdk_version",
    )
    for min_sdk in get_min_sdk_version_range()
]
